﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Runtime.CompilerServices;

namespace IBRx {
	public class HistoricalDataBase : IBResponse { }

	public class HistoricalData : HistoricalDataBase {
		public int ReqId { get; private set; }
		public string Date { get; private set; }
		public double Open { get; private set; }
		public double High { get; private set; }
		public double Low { get; private set; }
		public double Close { get; private set; }
		public int Volume { get; private set; }
		public int Count { get; private set; }
		public double WAP { get; private set; }
		public bool HasGaps { get; private set; }

		[MethodImplAttribute(MethodImplOptions.AggressiveInlining)]
		public HistoricalData(int reqId, string date, double open, double high, double low, double close, int volume, int count, double WAP, bool hasGaps) {
			this.ReqId = reqId;
			this.Date = date;
			this.Open = open;
			this.High = high;
			this.Low = low;
			this.Close = close;
			this.Volume = volume;
			this.Count = count;
			this.WAP = WAP;
			this.HasGaps = hasGaps;
		}
	}

	public class HistoricalDataEnd : HistoricalDataBase {
		public int ReqId { get; private set; }
		public string Start { get; private set; }
		public string End { get; private set; }

		[MethodImplAttribute(MethodImplOptions.AggressiveInlining)]
		public HistoricalDataEnd(int reqId, string start, string end) {
			this.ReqId = reqId;
			this.Start = start;
			this.End = end;
		}
	}
}
